package org.example.feign;

import org.example.controller.request.UseTrafficRequest;
import org.example.util.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @description:
 * @author: 谢超
 * @date: 2024/11/7 15:31
 */
@FeignClient(name = "dcloud-account-service")
public interface TrafficFeignService {
    /**
     * 使用流量包
     * @param request
     * @return
     */
    @PostMapping(value = "/api/traffic/v1/reduce", headers = {"rpc-token=${rpc.token}"})
    JsonData useTraffic(@RequestBody UseTrafficRequest request);
}
